<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
  <tr>
    <th>用户名</th>
    <th>密码</th>
    <th>昵称</th>
  </tr>
</table>
<script>
  let arr=[
    {name:"潘虹",password:123456,nickname:"帕斯"},
    {name:"张巍耀",password:366417,nickname:"张胖"},
    {name:"潘多多",password:123456,nickname:"阿多"},
    {name:"张年糕",password:366417,nickname:"糕糕"}
  ];
  let tb = document.querySelector("table")
  for (let user of arr) {
    let tr = document.createElement("tr")
    let nameTd = document.createElement("td")
    let pwdTd = document.createElement("td")
    let nicknameTd = document.createElement("td")
    nameTd.innerText = user.name
    pwdTd.innerText = user.password
    nicknameTd.innerText = user.nickname
    tr.append(nameTd,pwdTd,nicknameTd)
    tb.append(tr)
  }
</script>
</body>
</html>